import request from '../utils/request'

/**
 * 获取标签
 */
export function tags() {
    return request({
        url: '/api/news/tags',
        method: 'get'
    })
}

/**
 * 创建标签
 */
export function store(form) {
  return request({
    url: '/api/news/tags',
    method: 'post',
    data: { ...form }
  })
}

/**
 * 修改标签
 */
export function update(form, id) {
  return request({
    url: `/api/news/tags/${id}`,
    method: 'put',
    data: { ...form, id }
  })
}

/**
 * 删除标签
 */
export function destroy(id) {
  return request({
    url: `/api/news/tags/${id}`,
    method: 'delete',
    data: { id }
  })
}
